home *** CD-ROM | disk | FTP | other *** search
- Chapter 8
-
- DOS
-
- This chapter gives you information about how DOS uses memory.
- Using Manifest's DOS displays, you can determine how much memory
- is used by the DOS kernel, DOS data and device drivers. This
- section also gives you an understanding of what effect CONFIG.SYS
- statements have in increasing or decreasing DOS's memory
- overhead. And, if you are curious, you can compare the memory
- usage of each of your versions of DOS.
-
- If you are an inexperienced PC user, you may not be aware that
- you customize DOS on your PC through statements in your
- CONFIG.SYS file. These statements determine the DOS resources
- that are to be used. Manifest is interested in CONFIG.SYS because
- all statements allocating resources in CONFIG.SYS affect the use
- of memory. The DOS resources you see most frequently on
- Manifest's DOS screens are explained below.
-
- ~Item~ BUFFERS specifies the number of disk buffers allocated by
- DOS to speed up disk operations. Each buffer uses about 528 bytes
- of memory.
-
- ~Item~ DEVICE tells DOS, at system startup, to load a device
- driver (such as an expanded memory manager, a mouse driver, or
- network driver).
-
- ~Item~ FCBS specifies the number of file control blocks kept
- track of by DOS. Each FCB requires about 53 bytes of memory.
-
- ~Item~ FILES specifies the maximum number of files that can be
- open simultaneously. Each file requires about 53 bytes of memory
- each.
-
- ~Item~ LASTDRIVE lets you specify the drive letter of the last
- drive that DOS supports. The default is DRIVE=E. Each additional
- drive specified over the default uses about 81 bytes of memory.
-
- ~Item~ STACKS specifies the number and size for stacks reserved
- by DOS for hardware interrupts.
-
- ~Subhead~ DOS Overview (DO)
-
- DOS Overview gives you a summary of the memory used by your
- version of DOS. Using this screen, you can:
-
- ~Item~ understand the memory requirement of the devices loaded
- and DOS resources allocated in CONFIG.SYS,
-
- ~Item~ find out the amount of memory used by DOS to see if DOS
- devices/resources can be loaded in high memory.
-
- There are terms on the screen that need definition:
-
- ~Item~ Kernel: the memory used by the two system programs (IBMBIO
- and IBMDOS).
-
- ~Item~ Drivers: the amount of conventional memory used by the
- device drivers specified by DEVICE=statements in your CONFIG.SYS.
-
- ~Item~ Base Data: the amount of conventional memory used by DOS
- resource (FILES, etc.) statements in CONFIG.SYS~dash~including
- default values set by DOS.
-
- ~Item~ Added Data: DOS resource memory added by such programs as
- DOS SHARE and by Quarterdeck's BUFFERS and FILES programs.
-
- ~Subhead~ Please Note
-
- Manifest's report of your system configuration (bottom left of
- screen) may differ from your CONFIG.SYS: DOS allocates a default
- value for FILES, etc. regardless of whe-ther you specify it. This
- default varies, depending upon the version of DOS. The FCBS &
- LASTDRIVE resources were not supported until DOS 3.0. The STACKS
- resource was first supported in DOS 3.1. Thsse will not appear if
- your DOS version does not support them.
-
- The number of DOS FILES and BUFFERS shown in the memory map may
- be less than that reported in the left column of the Manifest
- display. In some versions of DOS the default memory allocated to
- buffers or files may be embedded in the DOS kernel. Manifest
- notes the files and buffers included in the DOS kernel.
-
- You may be able to reduce the conventional memory used by DOS:
- If your computer has EMS 4.0 or EEMS expanded memory hardware or
- is an 80386-based PC, you can relocate DOS memory (thereby
- increasing the memory available to programs), using Quarterdeck's
- QEMM, QRAM or their like, to move DOS resources (FILES, BUFFERS,
- etc.) into high memory.
-
- ~Subhead~ Tips on Using DOS Resources
-
- BUFFERS: These are blocks of memory that DOS uses to try to
- minimize disk accesses and therefore speed up file opeations.
- Each buffer is relatively large (about 528 bytes each), and so
- this is the resource that most significantly affects the memory
- that DOS uses. Primarily file lookups or directories are affected
- by the number of buffers. You want to choose a moderate number of
- buffers. With too few, it will take too long to access files.
- With too many, you are wasting memory for no good reason.
- Normally, 20 buffers is a good amount, unless you have some very
- long directories.
-
- There are two ways to increase the number of DOS buffers you use
- without using excessive conventional memory. Under DOS 2 or 3, if
- you have high RAM, you can load QEMM's and QRAM's BUFFERS program
- high (i.e. LOADHI BUFFERS) to increase the number of buffers
- beyond what you specify in CONFIG.SYS. Under DOS 4 with expanded
- memory, DOS provides a facility to load buffers into expanded
- memory (the BUFFERS /X switch). Unfortunately, there are several
- conditions which it is not safe to allow DOS to put buffers into
- expanded memory. You should only use /X if running MS-DOS 4.01 or
- PC-DOS 4.02 or higher, and only if there are no mappable pages
- above conventional memory other than the page frame and if you
- are not filling conventional memory into video memory (segment
- addresses A000-BFFF).
-
- FCBS: FCBS=n,m specifies that DOS should reserve n areas of
- memory, about 53 bytes each, to keep track of file control blocks
- (FCBs) that are open. m specifies the number of these FCBs that
- DOS should not close automatically in order to open more than
- will fit in the table. Relatively few programs use FCBs anymore,
- and so you usually do not need to specify any extra FCBs in
- CONFIG.SYS. FCB structures in DOS are usually only significant
- when DOS's SHARE is loaded.
-
- FILES: These are relatively small structures (about 53 bytes)
- with which DOS keeps track of files that are open. 20 files is
- usually sufficient, but, in a multitasking environment, you may
- need more.
-
- LASTDRIVE: This CONFIG.SYS parameter specifies the highest drive
- letter that DOS recognizes. The primary reason to specify a
- letter higher than the highest letter that is actually in use is
- to reserve drive letters for the DOS SUBST program. If you do not
- use SUBST, you do not need to set a LASTDRIVE.
-
- ~Subhead~ Tips on Using Dos Resources (Continued)
-
- STACKS: STACKS=n,m specifies that DOS should reserve n areas of
- memory, each m bytes long, to use as stacks for servicing
- hardware interrupts. By default, DOS reserves about 3.2K of
- conventional memory for these stacks, which is a significant
- amount of memory. DESQview already deals with the problem of
- choosing a stack for hardware interrupts, and so if you run
- predominantly in DESQview, you can specify STACKS=0,0 in DOS 3.3
- and higher to make DOS not reserve any room for these stacks.
-
- ~Subhead~ DOS Drivers (DR)
-
- DOS Drivers gives you information about the drivers Manifest
- finds on DOS's list of drives, called the device driver chain.
- These are standard devices always present in the DOS kernel and
- other devices as specified in CONFIG.SYS.
-
- This screen lists the actual order in which a driver is loaded
- into the driver chain. Usually the first device found is the NUL
- device.
-
- For each driver specified in CONFIG.SYS, Manifest displays the
- beginning and ending memory addresses used by the driver, its
- memory size and attributes. Both the name found in the device
- structure in memory and the program name (if available) are
- listed.
-
- Note that not all drivers show addresses of memory. The memory
- used by standard device drivers is embedded in the DOS kernel,
- and neither address range nor size is given.
-
- ~Subhead~ Attributes Described
-
- An attribute is a bit encoded word, containing 16 bits of
- information (9 bits defined; 7 undefined) that indicates highly
- technical characteristics of a device driver. In Manifest, the
- bits are indicated by C, S, B, x, R, L, K, N, O, and I :
-
- ~Item~ C ~dash~ character or block device
-
- ~Item~ S ~dash~ supports standard I/O control calls from DOS
-
- ~Item~ B ~dash~ supports output until a device is busy
-
- ~Item~ x ~dash~ undefined
-
- ~Item~ R ~dash~ supports removable media (i.e. floppy disk &
- CD ROM drives)
-
- ~Item~ L ~dash~ supports logical drives
-
- ~Item~ K ~dash~ clock device
-
- ~Item~ N ~dash~ NUL device
-
- ~Item~ O ~dash~ standard output device
-
- ~Item~ I ~dash~ standard input device
-
- ~Subhead~ Reporting Anomalies
-
- In describing your drivers, Manifest uses standard methods to
- find its information. Sometimes this information is incomplete.
-
- Program Name: Manifest may not be able to determine the name of
- the program file which contains your device driver. In this case,
- the field is blank.
-
- Memory Area or Size: Memory areas and sizes are only shown for
- device drivers loaded in your CONFIG.SYS. Other drivers are
- either part of the DOS kernel or are part of memory resident
- programs, such as Novell's NET3, that hooked themselves into the
- driver chain. Refer to the First Meg Programs screen for
- information on the memory usage of memory resident programs.
-
- Device Memory Usage & LOADHI.SYS: If you have used LOADHI.SYS to
- load drivers into high memory, the memory area and size listed in
- this section indicates only the addresses used by LOADHI.SYS and
- not the addresses used by the program. To find out how much high
- memory is used by the device in high memory, refer to the First
- Megabyte Programs display.
-
- Missing Drivers: The DOS Drivers screen reports on drivers that
- are present in the DOS driver chain. Some device drivers simply
- do something when loaded and then remove themselves from memory.
- These drivers will not appear in Manifest's list.
-
- ~Subhead~ DOS Files (DI)
-
- DOS Files shows you the total number of files and FCBs specified
- and the number open. It also lists the names of the open Files
- and FCBs, and when possible, the name of the program that opened
- the file. (The FCBs line only appears in DOS 3.0 and later
- versions).
-
- Manifest finds the information about which files and FCBs are
- open by looking in DOS's files and FCBs tables when this screen
- is selected. If you press the space bar, Manifest reexamines
- these tables and updates the display.
-
- You can use this display to:
-
- ~Item~ determine the adequacy of your FILES = level,
-
- ~Item~ determine programs which keep files open for extended
- periods,
-
- ~Item~ in DESQview, see files opened by several programs at a
- time, and
-
- ~Item~ identify programs using FCBs.
-
- ~Subhead~ Analyzing the Display
-
- Network Files & Manifest: If you are connected to a network and
- run Manifest locally from your PC, Manifest reports the files
- open on your PC, but does not report any files open on the
- server. If however, you run your licensed copy of Manifest from
- the server, it indicates all files open on the server, including
- the files opened on the server by a node.
-
- Already Open Files: There are three "standard" files that you
- will always see as open. DOS opens three devices, AUX, CON, and
- PRN, as files so that they can be accessed by programs through
- standard DOS requests. Thus there are typically three fewer file
- handles actually available to programs than the number specified
- on the FILES line of the CONFIG.SYS.
-
- Files "Unknown" display: A Files display entry with the text
- "Unknown" indicates that Manifest has detected an inconsistency
- in the file table. This typically is due to a DOS bug which
- leaves a file table entry marked as "in use" when it is not. It
- also means that this entry will remain unavailable until you
- reboot your system.
-
- FCBs used: While DOS keeps careful track of its table of open
- files, it is less careful with its table of open FCBs. In fact,
- many times it will leave entries in its FCB table marked as open
- even after they have been closed. This is usually not a problem.
- DOS can reuse slots in its FCB table even when there are open
- FCBs there. This characteristic can be prevented by using the
- second parameter to the DOS FCB statement. The second parameter
- is a number indicating how many of the total entries (specified
- by the first number) in the FCB table should be "protected" from
- being used when the entry is still marked as open. By default
- this number is 0, meaning all slots can be reused at any time.
- Also, even when DOS' FCB table is irretrievably filled up,
- programs can still open files using FCBs. Fortunately, this
- confusion is usually academic, since DOS never pays attention to
- its FCB table. Only certain utilities, such as the SHARE program
- that comes with DOS, do anything with the FCB table.
-
- ~Subhead~ DOS Environment (DE)
-
- The DOS environment is memory set aside for the purpose of
- assigning names and giving values to those names (variables)
- which programs can use in a number of ways. Every program in
- memory, including COMMAND.COM is given a copy of the
- environment.
-
- This screen shows you how much memory (in bytes) there is in the
- environment and how many bytes are as yet unused. The variables
- set and their values are shown in the lower window.
-
- ~Subhead~ Customer Support Tool
-
- You can use this screen to:
-
- ~Item~ find out where COMMAND.COM is located by way of (COMSPEC),
-
- ~Item~ verify the presence of a variable and its value, i.e. make
- sure your PATH = variable lists all the subdirectories it should,
-
- ~Item~ see how you or others have set up how COMMAND.COM displays
- its prompt (PROMPT=),
-
- ~Item~ verify the presence of variables your applications expect
- to be in the environment and their values,
-
- ~Item~ determine if you should increase or decrease the number of
- bytes in the environment,
-
- ~Item~ aid you in responding to questions about your environment
- from support personnel, and
-
- ~Item~ see, in DESQview, if applications in different windows
- have different environments set up by batch files.
-